import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import "@/Vant" //自动按需引入组件babel-plugin-import
import fastClick from 'fastclick'
import './plugins/filters'



//防抖
import _ from "lodash"
Vue.prototype._=_;
//登录cook
import  cookie from './util/cookie'
Vue.prototype.cookie=cookie;

//rem 已经默认1rem 16px
// import rem from './util/rem.js'
// Vue.use(rem)


Vue.config.productionTip = false
fastClick.attach(document.body) //解决移动端延迟

/**
 * 获取屏幕宽高，挂载全局方法。相当minux
 */
Vue.prototype.$getViewportSize = function () {
  return {
    width: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,//兼容性获取屏幕宽度
    height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight//兼容性获取屏幕高度
  };
};

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')


